<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "set_product_commission".
 *
 * @property int $id
 * @property int $product_id
 * @property float $r1 直推
 * @property float $r2
 * @property float $m1 代理费
 * @property float $m2
 * @property float $t1 团队费
 * @property float $t2
 * @property float $material 材料费
 * @property int $is_pen
 * @property float $me
 * @property float $offset 可以抵扣
 */
class SetProductCommission extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'set_product_commission';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['product_id'], 'integer'],
            [['r1', 'r2', 'm1', 'm2', 't1', 't2', 'material'], 'number'],

            [['is_pen', 'me', 'offset'], 'safe']
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'product_id' => 'Product ID',
            'r1' => 'R 1',
            'r2' => 'R 2',
            'm1' => 'M 1',
            'm2' => 'M 2',
            't1' => 'T 1',
            't2' => 'T 2',
            'material' => 'Material',
        ];
    }
}
